package streamforce.crypto.cloud.subscriber;
import java.io.ObjectOutputStream;
import java.util.concurrent.ThreadPoolExecutor;

import streamforce.crypto.event.TransformedCTEventAll;
import streamforce.crypto.event.TransformedCTEventAllAgg3;
import streamforce.crypto.event.TransformedCTEventJoin;
import streamforce.crypto.event.UserInitEvent; 

public class UserCiphertextSubscriber {
	private ObjectOutputStream oos; 
	private ThreadPoolExecutor executor; 
	
	public UserCiphertextSubscriber(ObjectOutputStream oos,
			ThreadPoolExecutor executor) {
		super();
		this.oos = oos;
		this.executor = executor;
	}

	public void update(TransformedCTEventAll event){		
		this.executor.execute(new UserEventThread(this.oos, event));
	}
	public void update(TransformedCTEventAllAgg3 event){
		this.executor.execute(new UserEventThread(this.oos, event));
	}
	public void update(TransformedCTEventJoin event){
		this.executor.execute(new UserEventThread(this.oos, event));
	}
}


